<?php
/**
 *	Option Views.
 *	@extends		Core_View
 *	@uses			View_Panel_PlatformSelector
 *	@author			Christian WÃ¼rker <Christian.Wuerker@CeuS-Media.de>
 *	@since			06.08.2007
 *	@version		0.1
 */
/**
 *	Option Views.
 *	@extends		Core_View
 *	@uses			View_Panel_PlatformSelector
 *	@author			Christian WÃ¼rker <Christian.Wuerker@CeuS-Media.de>
 *	@since			06.08.2007
 *	@version		0.1
 */
class View_Administration_Project extends CMF_Krypton_Core_DefinitionView
{
	private $nodeId;
	public static $linkId	= 'manageProjects';

	/**
	 *	Builds Car Views.
	 *	@access		public
	 *	@return		string
	 */
	public function buildContent()
	{
		$request	= CMF_Krypton_Core_Registry::getStatic( 'request' );
		$session	= CMF_Krypton_Core_Registry::getStatic( 'session' );
//		$projectSelect	= new View_Panel_ProjectSelector();
//		$ui['content']	= $projectSelect->buildContent();
		
		$projectId		= $request->get( 'projectId' );
		
		if( $projectId )
		{
			$view	= new View_Administration_Project_Edit;
			$ui['content']	= $view->buildContent( $projectId );
			$view	= new View_Administration_Project_Servers;
			$ui['content']	.= $view->buildContent( $projectId );
		}
		else if( $this->request->get( 'action' ) == 'add' )
		{
			$view	= new View_Administration_Project_Add;
			$ui['content']	.= $view->buildContent();
		}
		else
		{
			$view	= new View_Administration_Project_List;
			$ui['content']	= $view->buildContent();
		}
		return $ui['content'];
	}

	protected function getUrl( $parameters = array() )
	{
		$param	= http_build_query( $parameters, NULL, '&' );
		$param	= $param ? '&'.$param : '';
		$url	= './?link='.self::$linkId.$param;
		return $url;
	}
}
?>